package com.gulimall.common.constants;

import lombok.Getter;

/**
 * @author coder_ccy
 * @date 2022/4/6 14:42
 *
 * 能改变：反射，暴力反射？如何防止暴力反射
 */
public class RedisKeyPrefix {


    /**
     * 认证中心前缀
     */
    public static final RedisKeyPrefix AUTH_LOGININFO = new RedisKeyPrefix("auth:login:logininfo:",100000);

    /**
     * 购物车微服务前缀
     */
    public static final RedisKeyPrefix CART_CARTINFO = new RedisKeyPrefix("cart:cart:cartinfo:",100000);
    @Getter
    private String keyPrefix;

    @Getter
    private long expireTime;


    private RedisKeyPrefix(String keyPrefix,long expireTime){

        this.expireTime = expireTime;
        this.keyPrefix = keyPrefix;
    }
}
